package com.smforj.ssm.sys.model.query;

/**
 * Created by shibiao on 16/10/5.
 */
public class Pagination {
    private boolean pagination = true;
    private int total;
    private int pageIndex = 1;
    private int pageSize = 10;

    public boolean isPagination() {
        return pagination;
    }

    public void setPagination(boolean pagination) {
        this.pagination = pagination;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getOffset() {
        return (this.pageIndex - 1) * this.pageSize;
    }

    public int getLimit() {
        return this.pageSize;
    }
}
